package gisc.gov.vn.dev.xtable;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class XCustomFilter extends javax.swing.filechooser.FileFilter {
    @Override
    public boolean accept(File file) {
        // Allow only directories, or files with ".txt" extension
        return file.isDirectory() || file.getAbsolutePath().endsWith(".xls") || file.getAbsolutePath().endsWith(".XLS");
    }
    @Override
    public String getDescription() {
        // This description will be displayed in the dialog,
        // hard-coded = ugly, should be done via I18N
        return "Excel Document(*.xls)";
    }
	
} 
